package com.example.demo.loop.comon;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: daiguoqing
 * @Date: 2020-09-04
 * @Time: 15:36
 * @Version: hello-spring-boot 1.0
 */

/**
 * 自定义权限异常
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MyException  extends RuntimeException{
    //状态码
    private Integer code;

    /**
     * 自定义错误类型
     * @param code   自定义的错误状态码
     * @param msg    自定义的错误信息
     */
    public MyException(Integer code,String msg ) {
        super(msg);
        this.code = code;
    }

}
